import request from '@/utils/request'

const API ="/admin/hosp/hospitalSet";
//医院设置的相关请求
export default{
    //分页条件查询

    getList(page,size,searchObj){
        return request({
            url:`/admin/hosp/hospitalSet/pageQuery/${page}/${size}`,
            method:'post',
            data:searchObj //params参数以字符串方式传递(k1=v1) data参数以json对象方式传递
        })
    
    },

    //根据ID删除
    removeById(id){
        return request({
            url:`/admin/hosp/hospitalSet/${id}`,
            method:'delete'
           
        })
    
    },


    //添加
    add(hospset){
        return request({
            url:`/admin/hosp/hospitalSet/add`,
            method:'post',
            data: hospset,
           
        })
    
    },

     //根据ID查询
     getById(id){
        return request({
            url:`/admin/hosp/hospitalSet/${id}`,
            method:'get',
           
        })
    
    },

    //修改
    updateById (hospset){
        return request({
            url:`/admin/hosp/hospitalSet/update`,
            method:'post',
            data: hospset,
           
        })
    
    },

    //批量删除
    batchRemove (idList){
        return request({
            url:`/admin/hosp/hospitalSet/deleteByIds`,
            method:'delete',
            data: idList,
           
        })
    
    },

    //解锁与锁定
    lock (id,status){
        return request({
            url:`/admin/hosp/hospitalSet/update/${id}/${status}`,
            method:'post',
           
           
        })
    
    }


  }
    
